Conditions | 2 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { setBlockType } from 'prosemirror-commands'; |
||
11 | static getMenuItem(schema) { |
||
12 | if (!this.isAvailable(schema)) { |
||
13 | throw new Error('Paragraph not availabe in Schema!'); |
||
14 | } |
||
15 | return new MenuItem({ |
||
16 | command: setBlockType(schema.nodes.paragraph), |
||
17 | icon: svgIcon('format-paragraph'), |
||
18 | label: 'Paragraph', |
||
19 | }); |
||
20 | } |
||
21 | } |
||
22 |